package com.softeng.network.chess;

import javax.swing.*;

//import java.awt.Scrollbar;

import java.awt.Dimension;

public class HelpingMenu {
	
	JTextArea textArea;
	
	public int mWidth = 520;
	
	public int mHeight = 600;
	
	public JScrollPane scrollPane; 
	
	public JFrame frame; 
	
	public HelpingMenu(){
		
		frame = new JFrame("How to Play Network Chess");
		this.frame.setSize(new Dimension(this.mWidth ,this.mHeight));
		
		textArea = new JTextArea();
        textArea.setEditable(false);
         
        scrollPane = new JScrollPane(textArea);
        
        frame.add(scrollPane); 
        frame.add(textArea);

        JScrollPane scrollPane = new JScrollPane(textArea);
        scrollPane.setVerticalScrollBarPolicy(
                JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
        scrollPane.setPreferredSize(new Dimension(200, 75));
        frame.add(scrollPane); 
        
        
        textArea.insert(" Help Menu Contents:\n\n" +
        				" Rules for chess can be found at: http://en.wikipedia.org/wiki/Chess\n\n"+
        				" 1.) To launch Network Chess, launch the executable located on your desktop\n\n"+
        				" 2.) When software launches, you will have to enter a username and an ip address\n\n"+
        				" 3.) Click 'Send Game Request' or 'Host A Game' depending on what you would like to do\n\n"+
        				" 4.) You will be notified of your color\n\n"+
        				" 5.) If your color is white, you will be the first player to make a move\n\n"+
        				" 6.) Click the piece you would like to move, then click the square that you would like\n to move it to.  After the piece has been moved, it is the opponent's turn.  Continue to play\n as you would on a normal chess board", 0); 

        
	}

	public void display() {
		
		this.frame.setVisible(true);
		
	}

}
